<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>

<title>My JSP 'army_child_massage.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
    function abc() {

	var a = document.getElementById("toto").value;
	var b = document.getElementById("tx_2").value;
	var c = document.getElementById("tx_3").value;
	var d = document.getElementById("tx_4").value;
	var s = "您有新的访客\n访客姓名:" + c + "\n访客电话:" + b + "\n其他信息:" + d;
	document.smsform["mm"].value = s;
	document.smsform.submit();
	alert("发送成功！");
    }
</script>


</head>

<body>
	<form name="smsform" id="smsform"
		action="http://hdrobot.sinaapp.com/send.php" method="post">
		<table width="100%" height="177" border="0">
			<tr>
				<td colspan="2" align="center">被访者电话：<input type="text"
					name="toto" id="toto" /></td>
			</tr>
			<tr>
				<td colspan="2" align="center">访者电话：<input type="text"
					name="text_2" id="tx_2" />
				</td>

			</tr>
			<tr>

				<td colspan="2" align="center">访者姓名：<input type="text"
					name="text_3" id="tx_3" />
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">来访原因:<textarea rows="1"
						cols="30" name="text_4" id="tx_4"></textarea>
				</td>
			</tr>
		</table>

		<center>
			<input type="submit" value="发送" id="button_1" name="but_1"
				onclick="abc()"> <input type="reset" value="取消">
		</center>
		<input type="hidden" id="mm" value="fuck" name="mm" />
	</form>
</body>
</html>
